package alpha.com.google.code.mechanic.janitor.ui.handler;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;

import com.google.eclipse.mechanic.plugin.ui.OpenPreferencesAction;

/**
 * The class is to handle the command of sub menu item: "Preference Recorder"
 * of the Workspace Janitor menu.
 *
 * Last_edited: Aug 27, 2014
 *
 * @author jingjiejiang
 * @since Aug 4, 2014
 * 
 */
public class PrefRecorderHandler extends AbstractHandler {

  public Object execute(ExecutionEvent event) throws ExecutionException {
    
    OpenPreferencesAction actionOpenPreferences = 
      new OpenPreferencesAction("com.google.eclipse.mechanic.plugin.ui.MechanicPreferencePage");
    actionOpenPreferences.run();
    
    return null;
  }

}
